package com.tengju.activity.domain.shared;

public enum DomainExceptionCode {
    ID_SHOULD_BE_POSITIVE("ID必须大于0"),
    DATA_NOT_FOUND("找不到%s数据 ID:%s"),
    INVALID_DATA("数据异常 %s"),
    PRICE_SHOULD_BE_POSITIVE("价格不能小于0"),
    CAST_OBJECT_TO_JSON_FAIL("Cast object to json fail"),
    NOT_SUPPORT_OPERATION("不支持该操作 %s"),

    TRANSFER_STRATEGY_NOT_FOUND("转账策略未找到,渠道类型:%s"),
    CHANNEL_ALREADY_BIND("当前转账记录已经绑定渠道信息,当期不支持变动渠道信息,流水号%s"),
    BUSINESS_NO_CAN_NOT_BE_NULL("业务流水号不能为空"),
    TRADE_AMOUNT_CAN_NOT_BE_NULL("交易金额不能为空"),
    TRADE_AMOUNT_WRONG_FORMAT("交易金额格式上送不正确%s"),
    ACCOUNT_NAME_NO_CAN_NOT_BE_NULL("收款户名不能为空"),
    ACCOUNT_NO_CAN_NOT_BE_NULL("收款账号不能为空"),
    ACCOUNT_TYPE_CAN_NOT_BE_NULL("收款账户类型不能为空"),
    BANK_SETTLE_NAME_CAN_NOT_BE_NULL("对公账户必填收款行行名"),
    BANK_SETTLE_NO_CAN_NOT_BE_NULL("对公账户必填收款行行号"),
    TRADE_STATUS_CHANGE_FAIL("交易状态更新失败,原状态:%s,目标状态%s"),
    ;

    private String message;

    DomainExceptionCode(String message) {
        this.message = message;
    }

    public String getMessage(Object... param) {
        return String.format(message, param);
    }
}
